home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part1 / 4150 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: neurodne.demon.co.uk!not-for-mail
  2. From: jon@neurodne.demon.co.uk (Jon Raymond)
  3. Newsgroups: comp.sys.amiga.misc,demon.tech.amiga
  4. Subject: Re: MIDI + C + AMIGA ??
  5. Followup-To: comp.sys.amiga.misc,demon.tech.amiga
  6. Date: 3 Feb 1996 19:30:11 -0000
  7. Organization: Jon's Linux Box.
  8. Message-ID: <4f0d43$15j@neurodne.demon.co.uk>
  9. References: <4eh6en$7i1@bright.ecs.soton.ac.uk>
  10. X-NNTP-Posting-Host: neurodne.demon.co.uk
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Andrew Smith (ars94r@ecs.soton.ac.uk) wrote:
  14.  
  15. : Hi, I'm trying to get a start writing MIDI programs for my amiga 500, and
  16. : was wondering if anyone has written (or knows of anyone who has written)
  17. : code to implement calling midi events from C. I have heard of Bill Bartons
  18. : midi library but can't get that to work with SAS/Lattice C (don't know
  19. : why!). I'm prepared to switch compiler if it means getting access to a
  20. : ready made set of routines. If anyone knows what packages etc. are needed
  21. : (either commercial or on the net) then I'd be glad to hear from you!!
  22.  
  23. I wrote a software program for my A-Level many moons ago to turn my miggy
  24. 500 into a drum machine. It could load samples into memory and play them in
  25. response to incoming MIDI messages. I wrote it in assembler, but writing it
  26. in C now should be no problem. All you need to do it use the serial device
  27. and read the incoming messages. MIDI note-on and off messages come in a
  28. sequence of 3 bytes, as follows,
  29.  
  30.  
  31. 1 0 0 1 x x x x        ;1001=note on (1000 for note off):
  32.                 xxxx is channel 0-15 (1-16)
  33. 0 x x x x x x x        ;0=always 0: note value 0-127
  34. 0 x x x x x x x        ;0=always 0: velocity value 0-127
  35.  
  36. All above at 31.250Kbaud, 1 start and 1 stop bit.
  37.  
  38.  
  39. Thats it! As you can see, the MSB can be used to tell if you are out of sync
  40. so you shouldn't have any problems.
  41.  
  42. If you want more info get the book Advanced MIDI users guide by R.A Penfold.
  43. ISBN 1-870775-18-x. It costs about a tenner and is published by PC
  44. Publishing (I got mine from Maplin).
  45.  
  46.  
  47. : Cheers,
  48.  
  49. : Andy.
  50.  
  51. -- 
  52.  
  53.  Email jon@neurodne.demon.co.uk               Microsoft?: Permission denied
  54.